package com.maxiaowei.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OpenApiConfig {
    // http://localhost:8088/swagger-ui/index.html
    // http://localhost:8088/doc.html
    // http://localhost:8080/v3/api-docs
    @Bean
    public OpenAPI foodieOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("Foodie 平台接口 API")
                        .description("专门为 foodie 提供的 API 文档")
                        .version("1.0.1")
                        .contact(new Contact()
                                .name("maxiaowei")
                                .url("https://gitee.com/WXma/foodie-dev")
                                .email("abc@xxx.com")));
    }
}
